<div class="page-content" >
    <div class="panel panel-default">
        <div class="panel-heading">
            <ul class="breadcrumb">
                <li><a href="<{:U('index')}>">帖子分类</a></li>
                <li ><a href="<{:U('Group/topic',array('group_id'=>$pid,'type'=>$type))}>"><{$pidName}></a></li>
                <li class="active">创建/修改帖子</li>
            </ul>
        </div>
        <div class="panel-body">
            <form enctype="multipart/form-data" action="/BoxAdmin/Group/add_topic" class="form-horizontal" method="post" id="myform">
                <input type="hidden"  name="id" value="<{$data.id}>">
                <div class="form-group">
                    <label for="input-title" class="col-sm-2 control-label">标题</label>
                    <div class="col-sm-7">
                        <input type="text"  class="form-control" id="title" name="title" value="<{$data.title}>">
                    </div>
                </div>

                  <div class="form-group">
                    <label for="input-title" class="col-sm-2 control-label">外链</label>
                    <div class="col-sm-7">
                        <input type="text"  class="form-control" id="title" name="link" value="<{$data.link}>">
                    </div>
                </div>
															 
				<if condition="I('from') neq 'editContent'">
                <div class="form-group">
                    <label  class="col-sm-2 control-label">所属圈子</label>
                    <div class="col-sm-7">
                        <input type="text"  class="form-control" id="author" disabled="disabled" value="<{$pidName}>">
                        <input type="hidden" name="pid" value="<{$pid}>" />
                    </div>
                </div>
                <div class="form-group">
                    <label for="input-title" class="col-sm-2 control-label">归类</label>
                    <div class="col-sm-7">
                    <span data-type="cateList" type="<php>echo 'doc_'.$pid</php>" cate_id="<{$data['cate_id']}>"></span>
                       
                    </div>
                </div>
                <div class="form-group">
                    <label for="input-title" class="col-sm-2 control-label">类型</label>
                    <div class="col-sm-7">
                        <input type="text"   class="form-control" readonly="readonly" name="type" value="<{$type}>" />
                    </div>
                </div>
                <div class="form-group">
                    <label for="input-title" class="col-sm-2 control-label">作者用户ID</label>
                    <div class="col-sm-7">
                        <input type="text"  class="form-control" id="author" name="user_id" value="<{$data['user_id']?$data['user_id']:101081}>">
                    </div>
                </div>
				</if>
                <div class="form-group">
                    <label for="textarea-content" class="col-sm-2 control-label">内容</label>
                    <div class="col-sm-7">
                        <textarea style="width: 680px; height: 400px;" class="input_a1 " data-type="kindeditor" id="textarea-content" name="content" rows="2"><{$data.content}></textarea>
                        <div style=" margin-top:6px;" class="vall_alert vall_tx2"> 建议：介绍中的最佳图片宽度为480px 高度不限 <br>
                            代码标签：&lt;code class="prettyprint linenums lang-php"&gt;&lt;/code&gt; </div>
                    </div>
                </div>
 

                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-7">
                        <button type="submit" class="btn btn-primary">保存</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script>
 
$(function(){
    $(".form-horizontal").bootstrapValidator({
        message: '您填入的值不合法',
        fields:{
           
			title: {
                message: '标题',
                validators: {
                    notEmpty: {
                        message: '标题不能为空'
                    },
                }
            },
 

        }
    });
	
 
});
 </script>
  
